<?php



class CmsProductMapBuilder {

	
	const CLASS_NAME = 'lib.model.map.CmsProductMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap('propel');

		$tMap = $this->dbMap->addTable('cms_product');
		$tMap->setPhpName('CmsProduct');

		$tMap->setUseIdGenerator(true);

		$tMap->addPrimaryKey('PRODUCT_ID', 'ProductId', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('CATEGORIES_ID', 'CategoriesId', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('PRODUCT_CODE', 'ProductCode', 'string', CreoleTypes::VARCHAR, false, 15);

		$tMap->addColumn('PRODUCT_NAME', 'ProductName', 'string', CreoleTypes::VARCHAR, true, 50);

		$tMap->addColumn('PRODUCT_DESC', 'ProductDesc', 'string', CreoleTypes::LONGVARCHAR, false, null);

		$tMap->addColumn('PRODUCT_SHORT_DESC', 'ProductShortDesc', 'string', CreoleTypes::VARCHAR, false, 100);

		$tMap->addColumn('PRODUCT_NAME_CN', 'ProductNameCn', 'string', CreoleTypes::VARCHAR, false, 50);

		$tMap->addColumn('PRODUCT_DESC_CN', 'ProductDescCn', 'string', CreoleTypes::LONGVARCHAR, false, null);

		$tMap->addColumn('PRODUCT_SHORT_DESC_CN', 'ProductShortDescCn', 'string', CreoleTypes::VARCHAR, false, 100);

		$tMap->addColumn('PRODUCT_PHOTO', 'ProductPhoto', 'string', CreoleTypes::VARCHAR, false, 50);

		$tMap->addColumn('PRICE', 'Price', 'double', CreoleTypes::DOUBLE, false, null);

		$tMap->addColumn('PRICE2', 'Price2', 'double', CreoleTypes::DOUBLE, false, null);

		$tMap->addColumn('TOTAL_UNIT', 'TotalUnit', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('RATE', 'Rate', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('LAST_REVIEWS', 'LastReviews', 'string', CreoleTypes::LONGVARCHAR, false, null);

		$tMap->addColumn('REVIEWS_BY', 'ReviewsBy', 'string', CreoleTypes::VARCHAR, false, 100);

		$tMap->addColumn('MODAL', 'Modal', 'string', CreoleTypes::VARCHAR, false, 50);

		$tMap->addColumn('WEIGHT', 'Weight', 'double', CreoleTypes::DOUBLE, false, null);

		$tMap->addColumn('UOM', 'Uom', 'string', CreoleTypes::VARCHAR, false, 10);

		$tMap->addColumn('SPECIAL_ITEM', 'SpecialItem', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('STATUS_CODE', 'StatusCode', 'string', CreoleTypes::VARCHAR, true, 10);

		$tMap->addColumn('CREATED_BY', 'CreatedBy', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('CREATED_ON', 'CreatedOn', 'int', CreoleTypes::TIMESTAMP, true, null);

		$tMap->addColumn('UPDATED_BY', 'UpdatedBy', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('UPDATED_ON', 'UpdatedOn', 'int', CreoleTypes::TIMESTAMP, true, null);

	} 
} 